const {merge} = require('webpack-merge');
const base = require('./webpack-base');
const path = require('path');
module.exports = merge(base, {
    mode:'development',
    devtool: 'inline-source-map',
    devServer:{
        static:[
            path.resolve(__dirname,'dist'),
            path.resolve(__dirname,'public')
        ],
        // host:'0.0.0.0'
        host:'localhost',
        port:8080,
        open:true
    },
    module:{
        rules: [
            {
                test: /\.css$/,
                // loader执行顺序从最后一个开始
                use: ['style-loader', 'css-loader', 'postcss-loader'],
            },
            {
                test: /\.scss$/,
                // loader执行顺序从最后一个开始
                use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
            },
        ],
    }
});